/*
 Navicat Premium Data Transfer

 Source Server         : local_study_mysql
 Source Server Type    : MySQL
 Source Server Version : 80100 (8.1.0)
 Source Host           : 127.0.0.1:3307
 Source Schema         : bvc

 Target Server Type    : MySQL
 Target Server Version : 80100 (8.1.0)
 File Encoding         : 65001

 Date: 10/07/2025 18:23:40
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for auth_group
-- ----------------------------
DROP TABLE IF EXISTS `auth_group`;
CREATE TABLE `auth_group` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(150) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='group';

-- ----------------------------
-- Records of auth_group
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for auth_group_permissions
-- ----------------------------
DROP TABLE IF EXISTS `auth_group_permissions`;
CREATE TABLE `auth_group_permissions` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `group_id` int NOT NULL,
  `permission_id` int NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `auth_group_permissions_group_id_permission_id_0cd325b0_uniq` (`group_id`,`permission_id`),
  KEY `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` (`permission_id`),
  CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`),
  CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='group-permission relationship';

-- ----------------------------
-- Records of auth_group_permissions
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for auth_permission
-- ----------------------------
DROP TABLE IF EXISTS `auth_permission`;
CREATE TABLE `auth_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `content_type_id` int NOT NULL,
  `codename` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `auth_permission_content_type_id_codename_01ab375a_uniq` (`content_type_id`,`codename`),
  CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=137 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='permission';

-- ----------------------------
-- Records of auth_permission
-- ----------------------------
BEGIN;
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (1, 'Can add permission', 1, 'add_permission');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (2, 'Can change permission', 1, 'change_permission');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (3, 'Can delete permission', 1, 'delete_permission');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (4, 'Can view permission', 1, 'view_permission');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (5, 'Can add group', 2, 'add_group');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (6, 'Can change group', 2, 'change_group');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (7, 'Can delete group', 2, 'delete_group');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (8, 'Can view group', 2, 'view_group');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (9, 'Can add user', 3, 'add_user');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (10, 'Can change user', 3, 'change_user');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (11, 'Can delete user', 3, 'delete_user');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (12, 'Can view user', 3, 'view_user');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (13, 'Can add content type', 4, 'add_contenttype');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (14, 'Can change content type', 4, 'change_contenttype');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (15, 'Can delete content type', 4, 'delete_contenttype');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (16, 'Can view content type', 4, 'view_contenttype');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (17, 'Can add session', 5, 'add_session');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (18, 'Can change session', 5, 'change_session');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (19, 'Can delete session', 5, 'delete_session');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (20, 'Can view session', 5, 'view_session');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (21, 'Can add django job', 6, 'add_djangojob');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (22, 'Can change django job', 6, 'change_djangojob');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (23, 'Can delete django job', 6, 'delete_djangojob');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (24, 'Can view django job', 6, 'view_djangojob');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (25, 'Can add django job execution', 7, 'add_djangojobexecution');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (26, 'Can change django job execution', 7, 'change_djangojobexecution');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (27, 'Can delete django job execution', 7, 'delete_djangojobexecution');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (28, 'Can view django job execution', 7, 'view_djangojobexecution');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (29, 'Can add 系统日志表', 8, 'add_syslogs');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (30, 'Can change 系统日志表', 8, 'change_syslogs');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (31, 'Can delete 系统日志表', 8, 'delete_syslogs');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (32, 'Can view 系统日志表', 8, 'view_syslogs');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (33, 'Can add 用户表', 9, 'add_sysuser');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (34, 'Can change 用户表', 9, 'change_sysuser');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (35, 'Can delete 用户表', 9, 'delete_sysuser');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (36, 'Can view 用户表', 9, 'view_sysuser');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (37, 'Can add 系统角色表', 10, 'add_sysrole');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (38, 'Can change 系统角色表', 10, 'change_sysrole');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (39, 'Can delete 系统角色表', 10, 'delete_sysrole');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (40, 'Can view 系统角色表', 10, 'view_sysrole');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (41, 'Can add 系统用户角色与主机关联表', 11, 'add_sysrolegrouplist');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (42, 'Can change 系统用户角色与主机关联表', 11, 'change_sysrolegrouplist');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (43, 'Can delete 系统用户角色与主机关联表', 11, 'delete_sysrolegrouplist');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (44, 'Can view 系统用户角色与主机关联表', 11, 'view_sysrolegrouplist');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (45, 'Can add 角色监控组关联表', 12, 'add_sysrolemonitorgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (46, 'Can change 角色监控组关联表', 12, 'change_sysrolemonitorgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (47, 'Can delete 角色监控组关联表', 12, 'delete_sysrolemonitorgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (48, 'Can view 角色监控组关联表', 12, 'view_sysrolemonitorgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (49, 'Can add 系统用户角色关联表', 13, 'add_sysuserrole');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (50, 'Can change 系统用户角色关联表', 13, 'change_sysuserrole');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (51, 'Can delete 系统用户角色关联表', 13, 'delete_sysuserrole');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (52, 'Can view 系统用户角色关联表', 13, 'view_sysuserrole');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (53, 'Can add 系统菜单表', 14, 'add_sysmenu');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (54, 'Can change 系统菜单表', 14, 'change_sysmenu');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (55, 'Can delete 系统菜单表', 14, 'delete_sysmenu');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (56, 'Can view 系统菜单表', 14, 'view_sysmenu');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (57, 'Can add 系统角色菜单关联表', 15, 'add_sysrolemenu');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (58, 'Can change 系统角色菜单关联表', 15, 'change_sysrolemenu');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (59, 'Can delete 系统角色菜单关联表', 15, 'delete_sysrolemenu');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (60, 'Can view 系统角色菜单关联表', 15, 'view_sysrolemenu');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (61, 'Can add 命令批量执行记录表', 16, 'add_cmdrecord');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (62, 'Can change 命令批量执行记录表', 16, 'change_cmdrecord');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (63, 'Can delete 命令批量执行记录表', 16, 'delete_cmdrecord');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (64, 'Can view 命令批量执行记录表', 16, 'view_cmdrecord');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (65, 'Can add 文件分发记录表', 17, 'add_filedistribution');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (66, 'Can change 文件分发记录表', 17, 'change_filedistribution');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (67, 'Can delete 文件分发记录表', 17, 'delete_filedistribution');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (68, 'Can view 文件分发记录表', 17, 'view_filedistribution');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (69, 'Can add 服务器分组表', 18, 'add_grouplist');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (70, 'Can change 服务器分组表', 18, 'change_grouplist');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (71, 'Can delete 服务器分组表', 18, 'delete_grouplist');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (72, 'Can view 服务器分组表', 18, 'view_grouplist');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (73, 'Can add 服务器主机表', 19, 'add_hostlist');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (74, 'Can change 服务器主机表', 19, 'change_hostlist');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (75, 'Can delete 服务器主机表', 19, 'delete_hostlist');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (76, 'Can view 服务器主机表', 19, 'view_hostlist');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (77, 'Can add 服务器主机和分组关联表', 20, 'add_grouphost');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (78, 'Can change 服务器主机和分组关联表', 20, 'change_grouphost');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (79, 'Can delete 服务器主机和分组关联表', 20, 'delete_grouphost');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (80, 'Can view 服务器主机和分组关联表', 20, 'view_grouphost');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (81, 'Can add 告警联系组表', 21, 'add_alertcontactgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (82, 'Can change 告警联系组表', 21, 'change_alertcontactgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (83, 'Can delete 告警联系组表', 21, 'delete_alertcontactgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (84, 'Can view 告警联系组表', 21, 'view_alertcontactgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (85, 'Can add 告警联系人表', 22, 'add_alertcontactperson');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (86, 'Can change 告警联系人表', 22, 'change_alertcontactperson');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (87, 'Can delete 告警联系人表', 22, 'delete_alertcontactperson');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (88, 'Can view 告警联系人表', 22, 'view_alertcontactperson');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (89, 'Can add 监控分组表', 23, 'add_monitorgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (90, 'Can change 监控分组表', 23, 'change_monitorgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (91, 'Can delete 监控分组表', 23, 'delete_monitorgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (92, 'Can view 监控分组表', 23, 'view_monitorgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (93, 'Can add 告警联系人和告警联系组关联表', 24, 'add_alertcontactpersongroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (94, 'Can change 告警联系人和告警联系组关联表', 24, 'change_alertcontactpersongroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (95, 'Can delete 告警联系人和告警联系组关联表', 24, 'delete_alertcontactpersongroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (96, 'Can view 告警联系人和告警联系组关联表', 24, 'view_alertcontactpersongroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (97, 'Can add 监控任务表', 25, 'add_monitortask');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (98, 'Can change 监控任务表', 25, 'change_monitortask');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (99, 'Can delete 监控任务表', 25, 'delete_monitortask');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (100, 'Can view 监控任务表', 25, 'view_monitortask');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (101, 'Can add 告警记录表', 26, 'add_alertlogs');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (102, 'Can change 告警记录表', 26, 'change_alertlogs');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (103, 'Can delete 告警记录表', 26, 'delete_alertlogs');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (104, 'Can view 告警记录表', 26, 'view_alertlogs');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (105, 'Can add 监控任务与告警联系组关联表', 27, 'add_monitortaskalertgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (106, 'Can change 监控任务与告警联系组关联表', 27, 'change_monitortaskalertgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (107, 'Can delete 监控任务与告警联系组关联表', 27, 'delete_monitortaskalertgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (108, 'Can view 监控任务与告警联系组关联表', 27, 'view_monitortaskalertgroup');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (109, 'Can add 监控任务执行状态表', 28, 'add_monitortaskexecutionstatus');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (110, 'Can change 监控任务执行状态表', 28, 'change_monitortaskexecutionstatus');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (111, 'Can delete 监控任务执行状态表', 28, 'delete_monitortaskexecutionstatus');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (112, 'Can view 监控任务执行状态表', 28, 'view_monitortaskexecutionstatus');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (113, 'Can add TOTP device', 29, 'add_totpdevice');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (114, 'Can change TOTP device', 29, 'change_totpdevice');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (115, 'Can delete TOTP device', 29, 'delete_totpdevice');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (116, 'Can view TOTP device', 29, 'view_totpdevice');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (117, 'Can add static device', 30, 'add_staticdevice');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (118, 'Can change static device', 30, 'change_staticdevice');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (119, 'Can delete static device', 30, 'delete_staticdevice');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (120, 'Can view static device', 30, 'view_staticdevice');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (121, 'Can add static token', 31, 'add_statictoken');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (122, 'Can change static token', 31, 'change_statictoken');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (123, 'Can delete static token', 31, 'delete_statictoken');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (124, 'Can view static token', 31, 'view_statictoken');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (125, 'Can add log entry', 32, 'add_logentry');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (126, 'Can change log entry', 32, 'change_logentry');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (127, 'Can delete log entry', 32, 'delete_logentry');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (128, 'Can view log entry', 32, 'view_logentry');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (129, 'Can add mfa key', 33, 'add_mfakey');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (130, 'Can change mfa key', 33, 'change_mfakey');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (131, 'Can delete mfa key', 33, 'delete_mfakey');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (132, 'Can view mfa key', 33, 'view_mfakey');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (133, 'Can add 邮箱二次验证状态表', 34, 'add_twoauthstatus');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (134, 'Can change 邮箱二次验证状态表', 34, 'change_twoauthstatus');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (135, 'Can delete 邮箱二次验证状态表', 34, 'delete_twoauthstatus');
INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (136, 'Can view 邮箱二次验证状态表', 34, 'view_twoauthstatus');
COMMIT;

-- ----------------------------
-- Table structure for auth_user
-- ----------------------------
DROP TABLE IF EXISTS `auth_user`;
CREATE TABLE `auth_user` (
  `id` int NOT NULL AUTO_INCREMENT,
  `password` varchar(128) NOT NULL,
  `last_login` datetime(6) DEFAULT NULL,
  `is_superuser` tinyint(1) NOT NULL,
  `username` varchar(150) NOT NULL,
  `first_name` varchar(150) NOT NULL,
  `last_name` varchar(150) NOT NULL,
  `email` varchar(254) NOT NULL,
  `is_staff` tinyint(1) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `date_joined` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='user';

-- ----------------------------
-- Records of auth_user
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for auth_user_groups
-- ----------------------------
DROP TABLE IF EXISTS `auth_user_groups`;
CREATE TABLE `auth_user_groups` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `group_id` int NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `auth_user_groups_user_id_group_id_94350c0c_uniq` (`user_id`,`group_id`),
  KEY `auth_user_groups_group_id_97559544_fk_auth_group_id` (`group_id`),
  CONSTRAINT `auth_user_groups_group_id_97559544_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`),
  CONSTRAINT `auth_user_groups_user_id_6a12ed8b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='user-group relationship';

-- ----------------------------
-- Records of auth_user_groups
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for auth_user_user_permissions
-- ----------------------------
DROP TABLE IF EXISTS `auth_user_user_permissions`;
CREATE TABLE `auth_user_user_permissions` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `permission_id` int NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `auth_user_user_permissions_user_id_permission_id_14a6b632_uniq` (`user_id`,`permission_id`),
  KEY `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` (`permission_id`),
  CONSTRAINT `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`),
  CONSTRAINT `auth_user_user_permissions_user_id_a95ead1b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='user-permission relationship';

-- ----------------------------
-- Records of auth_user_user_permissions
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for django_apscheduler_djangojob
-- ----------------------------
DROP TABLE IF EXISTS `django_apscheduler_djangojob`;
CREATE TABLE `django_apscheduler_djangojob` (
  `id` varchar(255) NOT NULL,
  `next_run_time` datetime(6) DEFAULT NULL COMMENT 'Date and time at which this job is scheduled to be executed next.',
  `job_state` longblob NOT NULL,
  PRIMARY KEY (`id`),
  KEY `django_apscheduler_djangojob_next_run_time_2f022619` (`next_run_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='django job';

-- ----------------------------
-- Records of django_apscheduler_djangojob
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for django_apscheduler_djangojobexecution
-- ----------------------------
DROP TABLE IF EXISTS `django_apscheduler_djangojobexecution`;
CREATE TABLE `django_apscheduler_djangojobexecution` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `status` varchar(50) NOT NULL COMMENT 'The current status of this job execution.',
  `run_time` datetime(6) NOT NULL COMMENT 'Date and time at which this job was executed.',
  `duration` decimal(15,2) DEFAULT NULL COMMENT 'Total run time of this job (in seconds).',
  `finished` decimal(15,2) DEFAULT NULL COMMENT 'Timestamp at which this job was finished.',
  `exception` varchar(1000) DEFAULT NULL COMMENT 'Details of exception that occurred during job execution (if any).',
  `traceback` longtext COMMENT 'Traceback of exception that occurred during job execution (if any).',
  `job_id` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_job_executions` (`job_id`,`run_time`),
  KEY `django_apscheduler_djangojobexecution_run_time_16edd96b` (`run_time`),
  CONSTRAINT `django_apscheduler_djangojobexecution_job_id_daf5090a_fk` FOREIGN KEY (`job_id`) REFERENCES `django_apscheduler_djangojob` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='django job execution';

-- ----------------------------
-- Records of django_apscheduler_djangojobexecution
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for django_content_type
-- ----------------------------
DROP TABLE IF EXISTS `django_content_type`;
CREATE TABLE `django_content_type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `app_label` varchar(100) NOT NULL,
  `model` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='content type';

-- ----------------------------
-- Records of django_content_type
-- ----------------------------
BEGIN;
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (32, 'admin', 'logentry');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (2, 'auth', 'group');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (1, 'auth', 'permission');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (3, 'auth', 'user');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (4, 'contenttypes', 'contenttype');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (28, 'dashboard', 'monitortaskexecutionstatus');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (6, 'django_apscheduler', 'djangojob');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (7, 'django_apscheduler', 'djangojobexecution');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (29, 'django_otp', 'totpdevice');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (16, 'hosts_mgr', 'cmdrecord');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (17, 'hosts_mgr', 'filedistribution');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (20, 'hosts_mgr', 'grouphost');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (18, 'hosts_mgr', 'grouplist');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (19, 'hosts_mgr', 'hostlist');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (14, 'menu', 'sysmenu');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (15, 'menu', 'sysrolemenu');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (33, 'mfa', 'mfakey');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (21, 'monitor_alert_center', 'alertcontactgroup');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (22, 'monitor_alert_center', 'alertcontactperson');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (24, 'monitor_alert_center', 'alertcontactpersongroup');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (26, 'monitor_alert_center', 'alertlogs');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (23, 'monitor_alert_center', 'monitorgroup');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (25, 'monitor_alert_center', 'monitortask');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (27, 'monitor_alert_center', 'monitortaskalertgroup');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (30, 'otp_static', 'staticdevice');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (31, 'otp_static', 'statictoken');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (10, 'role', 'sysrole');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (11, 'role', 'sysrolegrouplist');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (12, 'role', 'sysrolemonitorgroup');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (13, 'role', 'sysuserrole');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (5, 'sessions', 'session');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (8, 'user', 'syslogs');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (9, 'user', 'sysuser');
INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (34, 'user', 'twoauthstatus');
COMMIT;

-- ----------------------------
-- Table structure for django_migrations
-- ----------------------------
DROP TABLE IF EXISTS `django_migrations`;
CREATE TABLE `django_migrations` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `app` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `applied` datetime(6) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='migration';

-- ----------------------------
-- Records of django_migrations
-- ----------------------------
BEGIN;
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (1, 'hosts_mgr', '0001_initial', '2025-04-23 16:21:26.696373');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (2, 'monitor_alert_center', '0001_initial', '2025-04-23 16:21:27.426836');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (3, 'user', '0001_initial', '2025-04-23 16:21:27.501485');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (4, 'role', '0001_initial', '2025-04-23 16:21:28.047918');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (5, 'contenttypes', '0001_initial', '2025-04-23 16:21:41.625042');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (6, 'contenttypes', '0002_remove_content_type_name', '2025-04-23 16:21:41.720761');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (7, 'auth', '0001_initial', '2025-04-23 16:21:42.409000');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (8, 'auth', '0002_alter_permission_name_max_length', '2025-04-23 16:21:42.476665');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (9, 'auth', '0003_alter_user_email_max_length', '2025-04-23 16:21:42.501194');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (10, 'auth', '0004_alter_user_username_opts', '2025-04-23 16:21:42.516007');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (11, 'auth', '0005_alter_user_last_login_null', '2025-04-23 16:21:42.587625');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (12, 'auth', '0006_require_contenttypes_0002', '2025-04-23 16:21:42.591138');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (13, 'auth', '0007_alter_validators_add_error_messages', '2025-04-23 16:21:42.600859');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (14, 'auth', '0008_alter_user_username_max_length', '2025-04-23 16:21:42.680038');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (15, 'auth', '0009_alter_user_last_name_max_length', '2025-04-23 16:21:42.746790');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (16, 'auth', '0010_alter_group_name_max_length', '2025-04-23 16:21:42.770220');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (17, 'auth', '0011_update_proxy_permissions', '2025-04-23 16:21:42.793197');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (18, 'auth', '0012_alter_user_first_name_max_length', '2025-04-23 16:21:42.861140');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (19, 'dashboard', '0001_initial', '2025-04-23 16:21:42.963131');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (20, 'dashboard', '0002_initial', '2025-04-23 16:21:43.142778');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (21, 'django_apscheduler', '0001_initial', '2025-04-23 16:21:43.309691');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (22, 'django_apscheduler', '0002_auto_20180412_0758', '2025-04-23 16:21:43.365599');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (23, 'django_apscheduler', '0003_auto_20200716_1632', '2025-04-23 16:21:43.396993');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (24, 'django_apscheduler', '0004_auto_20200717_1043', '2025-04-23 16:21:43.711964');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (25, 'django_apscheduler', '0005_migrate_name_to_id', '2025-04-23 16:21:43.739979');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (26, 'django_apscheduler', '0006_remove_djangojob_name', '2025-04-23 16:21:43.789927');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (27, 'django_apscheduler', '0007_auto_20200717_1404', '2025-04-23 16:21:43.919282');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (28, 'django_apscheduler', '0008_remove_djangojobexecution_started', '2025-04-23 16:21:43.946868');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (29, 'django_apscheduler', '0009_djangojobexecution_unique_job_executions', '2025-04-23 16:21:43.978942');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (30, 'menu', '0001_initial', '2025-04-23 16:21:44.182014');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (31, 'sessions', '0001_initial', '2025-04-23 16:21:44.234449');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (32, 'dashboard', '0003_remove_monitortaskexecutionstatus_create_time2', '2025-04-26 04:59:21.906495');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (33, 'otp_static', '0001_initial', '2025-04-28 22:30:37.331661');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (34, 'otp_static', '0002_throttling', '2025-04-28 22:30:37.464485');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (35, 'otp_static', '0003_add_timestamps', '2025-04-28 22:30:37.889021');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (36, 'two_factor', '0001_initial', '2025-04-28 22:30:37.894242');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (37, 'two_factor', '0002_auto_20150110_0810', '2025-04-28 22:30:37.899128');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (38, 'two_factor', '0003_auto_20150817_1733', '2025-04-28 22:30:37.909542');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (39, 'two_factor', '0004_auto_20160205_1827', '2025-04-28 22:30:37.914603');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (40, 'two_factor', '0005_auto_20160224_0450', '2025-04-28 22:30:37.919349');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (41, 'two_factor', '0006_phonedevice_key_default', '2025-04-28 22:30:37.924299');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (42, 'two_factor', '0007_auto_20201201_1019', '2025-04-28 22:30:37.929070');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (43, 'two_factor', '0008_delete_phonedevice', '2025-04-28 22:30:37.934617');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (44, 'two_factor', '0001_squashed_0008_delete_phonedevice', '2025-04-28 22:30:37.941338');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (45, 'admin', '0001_initial', '2025-04-29 18:04:24.401744');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (46, 'admin', '0002_logentry_remove_auto_add', '2025-04-29 18:04:24.415704');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (47, 'admin', '0003_logentry_add_action_flag_choices', '2025-04-29 18:04:24.429970');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (48, 'mfa', '0001_initial', '2025-05-12 17:20:45.434127');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (49, 'mfa', '0002_mfakey_last_code', '2025-05-12 17:20:45.498598');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (50, 'mfa', '0003_alter_mfakey_method', '2025-05-12 17:20:45.514106');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (51, 'mfa', '0004_alter_mfakey_id', '2025-05-12 17:20:45.589368');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (52, 'user', '0002_rename_phonenumber_sysuser_phone_number_and_more', '2025-05-13 10:40:59.623219');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (53, 'user', '0003_alter_sysuser_id', '2025-05-13 10:49:27.800145');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (54, 'user', '0004_remove_sysuser_two_auth_status', '2025-05-13 11:11:40.424725');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (55, 'user', '0005_twoauthstatus', '2025-05-13 11:12:54.660806');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (56, 'user', '0006_alter_twoauthstatus_status', '2025-05-13 11:17:02.826850');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (57, 'user', '0007_twoauthstatus_update_time', '2025-05-13 11:28:46.559942');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (58, 'monitor_alert_center', '0002_monitorgroup_order_num_monitortask_order_num', '2025-05-18 13:35:48.329334');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (59, 'monitor_alert_center', '0003_rename_order_num_monitorgroup_sort_num_and_more', '2025-05-18 13:51:52.637906');
INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (60, 'hosts_mgr', '0002_alter_hostlist_config_info_and_more', '2025-05-20 16:59:41.886990');
COMMIT;

-- ----------------------------
-- Table structure for django_session
-- ----------------------------
DROP TABLE IF EXISTS `django_session`;
CREATE TABLE `django_session` (
  `session_key` varchar(40) NOT NULL,
  `session_data` longtext NOT NULL,
  `expire_date` datetime(6) NOT NULL,
  PRIMARY KEY (`session_key`),
  KEY `django_session_expire_date_a5c62663` (`expire_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='session';

-- ----------------------------
-- Records of django_session
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for hosts_mgr_cmd_record
-- ----------------------------
DROP TABLE IF EXISTS `hosts_mgr_cmd_record`;
CREATE TABLE `hosts_mgr_cmd_record` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `cmd_content` longtext NOT NULL COMMENT '命令内容',
  `hostname` longtext NOT NULL COMMENT '主机名称',
  `status` smallint NOT NULL COMMENT '执行状态：1：成功、0：失败',
  `user` varchar(45) NOT NULL COMMENT '执行用户',
  `execution_time` datetime(6) NOT NULL COMMENT '执行时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='命令批量执行记录表';

-- ----------------------------
-- Records of hosts_mgr_cmd_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for hosts_mgr_file_distribution
-- ----------------------------
DROP TABLE IF EXISTS `hosts_mgr_file_distribution`;
CREATE TABLE `hosts_mgr_file_distribution` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `path` longtext NOT NULL COMMENT '分发路径',
  `hostname` varchar(45) NOT NULL COMMENT '主机名称',
  `user` varchar(45) NOT NULL COMMENT '分发用户',
  `status` smallint NOT NULL COMMENT '分发状态：1：成功、2：失败',
  `distribution_time` datetime(6) DEFAULT NULL COMMENT '分发时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='文件分发记录表';

-- ----------------------------
-- Records of hosts_mgr_file_distribution
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for hosts_mgr_group_host
-- ----------------------------
DROP TABLE IF EXISTS `hosts_mgr_group_host`;
CREATE TABLE `hosts_mgr_group_host` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `group_id` bigint NOT NULL,
  `host_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `hosts_mgr_group_host_group_id_bceaf3e0_fk_hosts_mgr` (`group_id`),
  KEY `hosts_mgr_group_host_host_id_ca7a00dd_fk_hosts_mgr_host_list_id` (`host_id`),
  CONSTRAINT `hosts_mgr_group_host_group_id_bceaf3e0_fk_hosts_mgr` FOREIGN KEY (`group_id`) REFERENCES `hosts_mgr_group_list` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `hosts_mgr_group_host_host_id_ca7a00dd_fk_hosts_mgr_host_list_id` FOREIGN KEY (`host_id`) REFERENCES `hosts_mgr_host_list` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='服务器主机和分组关联表';

-- ----------------------------
-- Records of hosts_mgr_group_host
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for hosts_mgr_group_list
-- ----------------------------
DROP TABLE IF EXISTS `hosts_mgr_group_list`;
CREATE TABLE `hosts_mgr_group_list` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(45) NOT NULL COMMENT '组名',
  `parent_id` int DEFAULT NULL COMMENT '父分组ID',
  `layered_id` smallint DEFAULT NULL COMMENT '分级ID',
  `create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime(6) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='服务器分组表';

-- ----------------------------
-- Records of hosts_mgr_group_list
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for hosts_mgr_host_list
-- ----------------------------
DROP TABLE IF EXISTS `hosts_mgr_host_list`;
CREATE TABLE `hosts_mgr_host_list` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `hostname` varchar(45) NOT NULL COMMENT '主机名称',
  `public_ip_addr` char(39) DEFAULT NULL COMMENT '公网IP地址',
  `private_ip_addr` char(39) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内网IP地址',
  `connect_ip` char(39) NOT NULL COMMENT '连接IP地址',
  `config_info` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '配置信息',
  `password` longtext NOT NULL COMMENT '密码',
  `port` smallint NOT NULL COMMENT 'SSH端口',
  `rdp_port` smallint DEFAULT NULL COMMENT 'RDP端口',
  `user` varchar(45) NOT NULL COMMENT '用户名',
  `status` smallint DEFAULT NULL COMMENT '状态(0验证失败,1未验证,2已验证)',
  `create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `remark` longtext COMMENT '备注',
  `sort_num` int DEFAULT NULL COMMENT '显示顺序',
  `server_type` smallint NOT NULL COMMENT '主机类型：1、linux,2、windows',
  PRIMARY KEY (`id`),
  UNIQUE KEY `hostname` (`hostname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='服务器主机表';

-- ----------------------------
-- Records of hosts_mgr_host_list
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for monitor_alert_center_alert_logs
-- ----------------------------
DROP TABLE IF EXISTS `monitor_alert_center_alert_logs`;
CREATE TABLE `monitor_alert_center_alert_logs` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `mon_group` varchar(45) NOT NULL COMMENT '监控组名称',
  `type` varchar(24) NOT NULL COMMENT '监控类型',
  `mon_path` varchar(90) NOT NULL COMMENT '监控地址',
  `alert_status` smallint DEFAULT NULL COMMENT '告警状态(0：告警中，1：已恢复)',
  `recv_alert_group` varchar(128) NOT NULL COMMENT '接收告警组',
  `duration_time` smallint NOT NULL COMMENT '持续时间(分钟数)',
  `alert_send_time` datetime(6) DEFAULT NULL COMMENT '发送告警时间',
  `first_alert_time` datetime(6) DEFAULT NULL COMMENT '第一次告警时间',
  `name_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `monitor_alert_center_name_id_13f4215e_fk_monitor_a` (`name_id`),
  KEY `monitor_alert_center_alert_logs_alert_send_time_ebd45ee3` (`alert_send_time`),
  CONSTRAINT `monitor_alert_center_name_id_13f4215e_fk_monitor_a` FOREIGN KEY (`name_id`) REFERENCES `monitor_alert_monitor_task` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='告警记录表';

-- ----------------------------
-- Records of monitor_alert_center_alert_logs
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for monitor_alert_contact_group
-- ----------------------------
DROP TABLE IF EXISTS `monitor_alert_contact_group`;
CREATE TABLE `monitor_alert_contact_group` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(45) NOT NULL COMMENT '联系组名',
  `remark` longtext COMMENT '描述',
  `create_time` datetime(6) NOT NULL COMMENT '创建时间',
  `update_time` datetime(6) NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='告警联系组表';

-- ----------------------------
-- Records of monitor_alert_contact_group
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for monitor_alert_contact_person
-- ----------------------------
DROP TABLE IF EXISTS `monitor_alert_contact_person`;
CREATE TABLE `monitor_alert_contact_person` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(45) NOT NULL COMMENT '联系人名',
  `phone_number` varchar(11) DEFAULT NULL COMMENT '手机号码',
  `email` varchar(254) DEFAULT NULL COMMENT '邮箱',
  `feishu_bot` varchar(128) DEFAULT NULL COMMENT '飞书群机器人',
  `feishu_bot_sign` varchar(128) DEFAULT NULL COMMENT '飞书群机器人安全签名',
  `ding_talk` varchar(128) DEFAULT NULL COMMENT '钉钉',
  `ding_talk_sign` varchar(128) DEFAULT NULL COMMENT '钉钉安全签名',
  `qw_id` varchar(128) DEFAULT NULL COMMENT '企微_企业ID',
  `qw_robot_secret` varchar(128) DEFAULT NULL COMMENT '企微_自建应用Secret',
  `qw_agent_id` varchar(128) DEFAULT NULL COMMENT '企微_自建应用AgentId',
  `qw_to_user` varchar(128) DEFAULT NULL COMMENT '企微_用户账号ID',
  `create_time` datetime(6) NOT NULL COMMENT '创建时间',
  `update_time` datetime(6) NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='告警联系人表';

-- ----------------------------
-- Records of monitor_alert_contact_person
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for monitor_alert_contact_person_group
-- ----------------------------
DROP TABLE IF EXISTS `monitor_alert_contact_person_group`;
CREATE TABLE `monitor_alert_contact_person_group` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `group_id` bigint NOT NULL,
  `person_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `monitor_alert_contac_group_id_39213920_fk_monitor_a` (`group_id`),
  KEY `monitor_alert_contac_person_id_994718d7_fk_monitor_a` (`person_id`),
  CONSTRAINT `monitor_alert_contac_group_id_39213920_fk_monitor_a` FOREIGN KEY (`group_id`) REFERENCES `monitor_alert_contact_group` (`id`),
  CONSTRAINT `monitor_alert_contac_person_id_994718d7_fk_monitor_a` FOREIGN KEY (`person_id`) REFERENCES `monitor_alert_contact_person` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='告警联系人和告警联系组关联表';

-- ----------------------------
-- Records of monitor_alert_contact_person_group
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for monitor_alert_monitor_group
-- ----------------------------
DROP TABLE IF EXISTS `monitor_alert_monitor_group`;
CREATE TABLE `monitor_alert_monitor_group` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(45) NOT NULL COMMENT '分组名称',
  `create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `sort_num` smallint NOT NULL COMMENT '显示顺序',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='监控分组表';

-- ----------------------------
-- Records of monitor_alert_monitor_group
-- ----------------------------
BEGIN;
INSERT INTO `monitor_alert_monitor_group` (`id`, `name`, `create_time`, `sort_num`) VALUES (3, '测试环境_进程检测', '2025-04-01 18:24:22.506933', 1);
INSERT INTO `monitor_alert_monitor_group` (`id`, `name`, `create_time`, `sort_num`) VALUES (4, '开发环境', '2025-04-11 13:44:35.344197', 2);
COMMIT;

-- ----------------------------
-- Table structure for monitor_alert_monitor_task
-- ----------------------------
DROP TABLE IF EXISTS `monitor_alert_monitor_task`;
CREATE TABLE `monitor_alert_monitor_task` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `enable_status` smallint DEFAULT NULL COMMENT '任务启用状态(1：启用，2：禁用)',
  `task_status` smallint NOT NULL COMMENT '任务执行状态(0:未验证，1：成功，2：失败)',
  `num_of_fail` smallint NOT NULL COMMENT '任务执行失败次数',
  `type` smallint NOT NULL COMMENT '监控类型(1：站点检测，2：端口检测，3：进程检测，4：自定义脚本)',
  `name` varchar(45) NOT NULL COMMENT '监控名称',
  `mon_path` varchar(90) NOT NULL COMMENT '监控地址',
  `timeout` int DEFAULT NULL COMMENT '超时时间(ms)',
  `mon_freq` varchar(24) NOT NULL COMMENT '监控频率',
  `trigger_threshold` varchar(24) NOT NULL COMMENT '触发阈值',
  `alert_method_list` json NOT NULL COMMENT '告警方式(1：邮箱，2：飞书，3：企业微信，4：钉钉)',
  `last_alert_time` int NOT NULL COMMENT '上一次告警的时间戳',
  `quiet_time` varchar(24) NOT NULL COMMENT '沉默时间(分钟数)',
  `remark` longtext COMMENT '备注',
  `create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `fail_time` datetime(6) DEFAULT NULL COMMENT '故障时间',
  `recovery_time` datetime(6) DEFAULT NULL COMMENT '恢复时间',
  `host_id` bigint DEFAULT NULL,
  `mon_group_id` bigint NOT NULL,
  `sort_num` smallint NOT NULL COMMENT '显示顺序',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `monitor_alert_monito_host_id_410d402d_fk_hosts_mgr` (`host_id`),
  KEY `monitor_alert_monito_mon_group_id_b92acd34_fk_monitor_a` (`mon_group_id`),
  CONSTRAINT `monitor_alert_monito_host_id_410d402d_fk_hosts_mgr` FOREIGN KEY (`host_id`) REFERENCES `hosts_mgr_host_list` (`id`),
  CONSTRAINT `monitor_alert_monito_mon_group_id_b92acd34_fk_monitor_a` FOREIGN KEY (`mon_group_id`) REFERENCES `monitor_alert_monitor_group` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='监控任务表';

-- ----------------------------
-- Records of monitor_alert_monitor_task
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for monitor_task_alert_group
-- ----------------------------
DROP TABLE IF EXISTS `monitor_task_alert_group`;
CREATE TABLE `monitor_task_alert_group` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL COMMENT '创建时间',
  `alert_group_id` bigint NOT NULL,
  `monitor_task_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `monitor_task_alert_g_alert_group_id_f1730d20_fk_monitor_a` (`alert_group_id`),
  KEY `monitor_task_alert_g_monitor_task_id_f897fbd5_fk_monitor_a` (`monitor_task_id`),
  CONSTRAINT `monitor_task_alert_g_alert_group_id_f1730d20_fk_monitor_a` FOREIGN KEY (`alert_group_id`) REFERENCES `monitor_alert_contact_group` (`id`),
  CONSTRAINT `monitor_task_alert_g_monitor_task_id_f897fbd5_fk_monitor_a` FOREIGN KEY (`monitor_task_id`) REFERENCES `monitor_alert_monitor_task` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=104 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='监控任务与告警联系组关联表';

-- ----------------------------
-- Records of monitor_task_alert_group
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for monitor_task_execution_status
-- ----------------------------
DROP TABLE IF EXISTS `monitor_task_execution_status`;
CREATE TABLE `monitor_task_execution_status` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `type` smallint DEFAULT NULL COMMENT '监控类型(1：站点检测，2：端口检测，3：进程检测，4：自定义脚本)',
  `status` smallint NOT NULL COMMENT '监控任务执行状态(0:执行失败，1：执行成功)',
  `create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `group_id` bigint NOT NULL,
  `name_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `monitor_task_execution_status_status_16c1556b` (`status`),
  KEY `monitor_task_execution_status_create_time_02f2a2ff` (`create_time`),
  KEY `monitor_task_executi_group_id_68d6ee1c_fk_monitor_a` (`group_id`),
  KEY `monitor_task_executi_name_id_8c8d9237_fk_monitor_a` (`name_id`),
  CONSTRAINT `monitor_task_executi_group_id_68d6ee1c_fk_monitor_a` FOREIGN KEY (`group_id`) REFERENCES `monitor_alert_monitor_group` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `monitor_task_executi_name_id_8c8d9237_fk_monitor_a` FOREIGN KEY (`name_id`) REFERENCES `monitor_alert_monitor_task` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='监控任务执行状态表';

-- ----------------------------
-- Records of monitor_task_execution_status
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_logs
-- ----------------------------
DROP TABLE IF EXISTS `sys_logs`;
CREATE TABLE `sys_logs` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `login_time` datetime(6) DEFAULT NULL COMMENT '登陆时间',
  `username` varchar(100) NOT NULL COMMENT '用户名',
  `status` smallint NOT NULL COMMENT '登陆状态(1登陆成功，0登陆失败)',
  `login_ip` char(39) NOT NULL COMMENT '登陆IP',
  `user_agent` longtext COMMENT 'UserAgent',
  `remark` longtext COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=230 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系统日志表';

-- ----------------------------
-- Records of sys_logs
-- ----------------------------
BEGIN;
INSERT INTO `sys_logs` (`id`, `login_time`, `username`, `status`, `login_ip`, `user_agent`, `remark`) VALUES (229, '2025-05-28 15:40:05.790902', 'admin', 1, '172.19.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0', '');
COMMIT;

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL COMMENT '菜单名称',
  `icon` varchar(100) DEFAULT NULL COMMENT '菜单图标',
  `parent_id` int DEFAULT NULL COMMENT '父菜单ID',
  `order_num` int DEFAULT NULL COMMENT '显示顺序',
  `path` varchar(200) DEFAULT NULL COMMENT '路由地址',
  `component` varchar(255) DEFAULT NULL COMMENT '组件路径',
  `menu_type` varchar(1) DEFAULT NULL COMMENT '菜单类型（M目录 C菜单 F按钮）',
  `perms` varchar(100) DEFAULT NULL COMMENT '权限标识',
  `create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系统菜单表';

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu` (`id`, `name`, `icon`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `perms`, `create_time`, `update_time`, `remark`) VALUES (1, '系统管理', 'Setting', 0, 2, '/sys', '', 'M', '', '2024-07-04 00:00:00.000000', '2025-03-17 11:46:12.391380', '系统管理目录');
INSERT INTO `sys_menu` (`id`, `name`, `icon`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `perms`, `create_time`, `update_time`, `remark`) VALUES (3, '用户管理', 'User', 1, 1, '/sys/user', 'sys/user/index', 'C', 'system:user:list', '2024-07-04 00:00:00.000000', '2025-03-27 18:23:30.051401', '用户管理菜单');
INSERT INTO `sys_menu` (`id`, `name`, `icon`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `perms`, `create_time`, `update_time`, `remark`) VALUES (4, '角色管理', 'Avatar', 1, 2, '/sys/role', 'sys/role/index', 'C', 'system:role:list', '2024-07-04 00:00:00.000000', '2025-03-07 18:10:26.691916', '角色管理菜单');
INSERT INTO `sys_menu` (`id`, `name`, `icon`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `perms`, `create_time`, `update_time`, `remark`) VALUES (5, '菜单管理', 'Memo', 1, 3, '/sys/menu', 'sys/menu/index', 'C', 'system:menu:list', '2024-07-04 00:00:00.000000', '2025-03-07 18:11:29.350654', '菜单管理菜单');
INSERT INTO `sys_menu` (`id`, `name`, `icon`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `perms`, `create_time`, `update_time`, `remark`) VALUES (15, '登陆日志', 'Clock', 1, 4, '/sys/logs', 'sys/logs/index', 'C', 'system:logs:list', '2025-01-15 11:56:56.309076', '2025-03-07 18:12:16.135204', '用户登陆日志');
INSERT INTO `sys_menu` (`id`, `name`, `icon`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `perms`, `create_time`, `update_time`, `remark`) VALUES (16, '主机管理', 'Platform', 0, 3, '/host', 'mgr/host/index', 'C', 'host:list', '2025-01-15 19:06:06.409516', '2025-03-17 11:46:20.457421', '主机管理');
INSERT INTO `sys_menu` (`id`, `name`, `icon`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `perms`, `create_time`, `update_time`, `remark`) VALUES (18, '批量执行', 'DocumentCopy', 0, 4, '/job', 'job/index', 'C', 'job:list', '2025-03-03 17:16:48.146873', '2025-04-18 21:36:16.217112', '命令批量执行');
INSERT INTO `sys_menu` (`id`, `name`, `icon`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `perms`, `create_time`, `update_time`, `remark`) VALUES (19, '文件分发', 'Files', 0, 5, '/file/distribution', 'fileDistribution/index', 'C', 'file:list', '2025-03-07 18:39:58.178997', '2025-03-17 11:46:31.529187', '文件分发');
INSERT INTO `sys_menu` (`id`, `name`, `icon`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `perms`, `create_time`, `update_time`, `remark`) VALUES (20, '监控中心', 'Monitor', 0, 6, '/monitor', 'monitorCenter/index', 'C', 'monitor:list', '2025-03-17 11:29:01.048946', '2025-03-25 14:00:31.388098', '监控中心');
INSERT INTO `sys_menu` (`id`, `name`, `icon`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `perms`, `create_time`, `update_time`, `remark`) VALUES (21, 'DashBoard', 'PictureRounded', 0, 1, '/dashBoard', 'dashBoard/index', 'C', 'dashBoard:list', '2025-03-17 11:46:05.840034', '2025-04-07 16:50:46.080659', 'DashBoard');
INSERT INTO `sys_menu` (`id`, `name`, `icon`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `perms`, `create_time`, `update_time`, `remark`) VALUES (22, '告警中心', 'AlarmClock', 0, 7, '/alert', '', 'M', '', '2025-03-25 14:01:06.785217', '2025-03-25 14:11:34.711784', '告警中心目录');
INSERT INTO `sys_menu` (`id`, `name`, `icon`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `perms`, `create_time`, `update_time`, `remark`) VALUES (23, '告警发送记录', 'Clock', 22, 1, '/alert/logs', 'alertCenter/alertLogs/index', 'C', 'alert:logs:list', '2025-03-25 14:26:32.374336', '2025-04-07 14:21:43.430077', '告警记录');
INSERT INTO `sys_menu` (`id`, `name`, `icon`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `perms`, `create_time`, `update_time`, `remark`) VALUES (24, '告警联系人', 'UserFilled', 22, 2, '/alert/contactPerson', 'alertCenter/alertContactPerson/index', 'C', 'alert:contactPerson:list', '2025-03-25 14:29:17.157443', '2025-03-25 14:29:17.157476', '告警联系人');
INSERT INTO `sys_menu` (`id`, `name`, `icon`, `parent_id`, `order_num`, `path`, `component`, `menu_type`, `perms`, `create_time`, `update_time`, `remark`) VALUES (25, '告警联系组', 'Money', 22, 3, '/alert/contactGroup', 'alertCenter/alertContactGroup/index', 'C', 'alert:contactGroup:list', '2025-03-25 14:34:19.663491', '2025-03-25 14:34:19.663518', '告警联系组');
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(30) DEFAULT NULL COMMENT '角色名称',
  `code` varchar(100) DEFAULT NULL COMMENT '角色权限字符串',
  `create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系统角色表';

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` (`id`, `name`, `code`, `create_time`, `update_time`, `remark`) VALUES (1, '超级管理员', 'admin', '2024-07-04 00:00:00.000000', '2024-07-04 00:00:00.000000', '拥有系统最高权限');
INSERT INTO `sys_role` (`id`, `name`, `code`, `create_time`, `update_time`, `remark`) VALUES (2, '普通角色', 'common', '2025-01-10 11:30:17.208904', '2025-03-03 15:52:36.962672', '普通角色');
INSERT INTO `sys_role` (`id`, `name`, `code`, `create_time`, `update_time`, `remark`) VALUES (3, '测试角色', 'test', '2024-07-04 00:00:00.000000', '2025-01-10 11:38:40.071914', '测试角色');
INSERT INTO `sys_role` (`id`, `name`, `code`, `create_time`, `update_time`, `remark`) VALUES (34, 'test1', 'test1', '2025-01-10 17:22:06.713043', '2025-01-10 17:22:06.713069', 'test1');
INSERT INTO `sys_role` (`id`, `name`, `code`, `create_time`, `update_time`, `remark`) VALUES (35, 'test2', 'test2', '2025-01-10 17:22:15.386812', '2025-01-10 17:22:15.386853', 'test2');
INSERT INTO `sys_role` (`id`, `name`, `code`, `create_time`, `update_time`, `remark`) VALUES (36, 'test3', 'test3', '2025-01-10 17:22:22.045802', '2025-01-10 17:22:22.045849', 'test3');
COMMIT;

-- ----------------------------
-- Table structure for sys_role_group_list
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_group_list`;
CREATE TABLE `sys_role_group_list` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `group_id` bigint NOT NULL,
  `role_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sys_role_group_list_group_id_05f48bb0_fk_hosts_mgr_group_list_id` (`group_id`),
  KEY `sys_role_group_list_role_id_edac254f_fk_sys_role_id` (`role_id`),
  CONSTRAINT `sys_role_group_list_group_id_05f48bb0_fk_hosts_mgr_group_list_id` FOREIGN KEY (`group_id`) REFERENCES `hosts_mgr_group_list` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `sys_role_group_list_role_id_edac254f_fk_sys_role_id` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系统用户角色与主机关联表';

-- ----------------------------
-- Records of sys_role_group_list
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `menu_id` bigint NOT NULL,
  `role_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sys_role_menu_menu_id_5c7ca896_fk_sys_menu_id` (`menu_id`),
  KEY `sys_role_menu_role_id_e0dcb43b_fk_sys_role_id` (`role_id`),
  CONSTRAINT `sys_role_menu_menu_id_5c7ca896_fk_sys_menu_id` FOREIGN KEY (`menu_id`) REFERENCES `sys_menu` (`id`),
  CONSTRAINT `sys_role_menu_role_id_e0dcb43b_fk_sys_role_id` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1008 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系统角色菜单关联表';

-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (943, 21, 3);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (944, 1, 3);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (945, 3, 3);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (946, 4, 3);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (947, 5, 3);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (948, 15, 3);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (949, 16, 3);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (950, 18, 3);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (951, 19, 3);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (952, 20, 3);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (953, 22, 3);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (954, 23, 3);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (955, 24, 3);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (956, 25, 3);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (985, 21, 2);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (986, 16, 2);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (987, 18, 2);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (988, 19, 2);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (989, 20, 2);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (990, 22, 2);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (991, 23, 2);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (992, 24, 2);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (993, 25, 2);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (994, 21, 1);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (995, 1, 1);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (996, 3, 1);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (997, 4, 1);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (998, 5, 1);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (999, 15, 1);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (1000, 16, 1);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (1001, 18, 1);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (1002, 19, 1);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (1003, 20, 1);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (1004, 22, 1);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (1005, 23, 1);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (1006, 24, 1);
INSERT INTO `sys_role_menu` (`id`, `menu_id`, `role_id`) VALUES (1007, 25, 1);
COMMIT;

-- ----------------------------
-- Table structure for sys_role_monitor_group
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_monitor_group`;
CREATE TABLE `sys_role_monitor_group` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `group_id` bigint NOT NULL,
  `role_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sys_role_monitor_gro_group_id_89d52600_fk_monitor_a` (`group_id`),
  KEY `sys_role_monitor_group_role_id_49758c32_fk_sys_role_id` (`role_id`),
  CONSTRAINT `sys_role_monitor_gro_group_id_89d52600_fk_monitor_a` FOREIGN KEY (`group_id`) REFERENCES `monitor_alert_monitor_group` (`id`),
  CONSTRAINT `sys_role_monitor_group_role_id_49758c32_fk_sys_role_id` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='角色监控组关联表';

-- ----------------------------
-- Records of sys_role_monitor_group
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_monitor_group` (`id`, `group_id`, `role_id`) VALUES (9, 4, 1);
INSERT INTO `sys_role_monitor_group` (`id`, `group_id`, `role_id`) VALUES (10, 3, 1);
COMMIT;

-- ----------------------------
-- Table structure for sys_two_auth_status
-- ----------------------------
DROP TABLE IF EXISTS `sys_two_auth_status`;
CREATE TABLE `sys_two_auth_status` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `status` smallint NOT NULL COMMENT '邮箱二次认证(1启用，0禁用)',
  `update_time` datetime(6) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='邮箱二次验证状态表';

-- ----------------------------
-- Records of sys_two_auth_status
-- ----------------------------
BEGIN;
INSERT INTO `sys_two_auth_status` (`id`, `status`, `update_time`) VALUES (1, 0, '2025-05-28 15:40:32.234189');
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL COMMENT '用户名',
  `password` varchar(100) NOT NULL COMMENT '密码',
  `avatar` varchar(255) DEFAULT NULL COMMENT '用户头像',
  `email` varchar(100) DEFAULT NULL COMMENT '用户邮箱',
  `phone_number` varchar(16) DEFAULT NULL COMMENT '手机号码',
  `login_date` datetime(6) DEFAULT NULL COMMENT '最后登录时间',
  `status` int DEFAULT NULL COMMENT '帐号状态（1正常 0停用）',
  `create_time` datetime(6) DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime(6) DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户表';

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` (`id`, `username`, `password`, `avatar`, `email`, `phone_number`, `login_date`, `status`, `create_time`, `update_time`, `remark`) VALUES (1, 'admin', '/bZE1VUTizs30/Rz6Y561A==', 'default.jpg', '123@163.com', '12345678912', '2025-05-28 15:40:05.784600', 1, '2025-01-08 11:11:18.167831', '2025-04-09 18:15:56.220639', 'admin');
COMMIT;

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `role_id` bigint NOT NULL,
  `user_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sys_user_role_role_id_63624973_fk_sys_role_id` (`role_id`),
  KEY `sys_user_role_user_id_5f2fb964_fk` (`user_id`),
  CONSTRAINT `sys_user_role_role_id_63624973_fk_sys_role_id` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`),
  CONSTRAINT `sys_user_role_user_id_5f2fb964_fk` FOREIGN KEY (`user_id`) REFERENCES `sys_user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系统用户角色关联表';

-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_role` (`id`, `role_id`, `user_id`) VALUES (1, 1, 1);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
